with reconeixedor; use reconeixedor;
use reconeixedor.mytree;
procedure derivador is

procedure deriva (x: in out arbre; dx: out arbre) is
begin
	case x is
		when '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '0' =>
    
      lliure:= dm(lliure).s;
      m(i).val:= 1.0;
		when 'x' => 
      lliure:= m(lliure).s;
      m(i).val:= 'x';
		when '(' => shift(exp); rec_exp(exp, f); shift(exp);

    when others => null;
    end case;
end deriva;
begin

null;
end derivador;
